<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<input type="hidden" name="proposal/zh_title" value="<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/org_name" /><x:out select="$xmlData/data/proposal/sub_grant_name"/>"/> 
<input type="hidden" name="organizations/organization[0]@submit_org" value="1" >
<input type="hidden" name="organizations/organization[0]/org_code" value="<x:out select="$xmlData/data/organizations/organization[@submit_org=1]/org_code"/>" >
<div class="t_bar"><span class="color_red">*</span>${param.title }</div>
<table class="t_css table01" width="100%" border="0" cellpadding="0" id="orgInfo1" cellspacing="1">
	<col style="width:18%"/>
	<col style="width:32%"/>
	<col style="width:20%"/>
	<col style="width:30%"/>
	<tr>
		<td align="right">企业名称：</td>
		<td>
		<span name="organizations/org_name"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/org_name" />
		    </span>
         	
		
		</td>
		<td align="right">统一社会信用代码 ：</td>
		<td>
		    <span name="organizations/org_no"> 
			     <c:set var="zhuzhi"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/org_no" /></c:set>
			    <c:set var="tongyi"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/org_shxy_no" /></c:set>
			    <c:if test="${not empty tongyi}">${tongyi}</c:if>
			    <c:if test="${empty tongyi}">${zhuzhi}</c:if>
			      
		    </span>
		</td>
	</tr>
	
	<tr>
		<td align="right">通信地址：</td>
		<td> <span name="organizations/address">
				<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/address" />
		    </span>
		</td>
		<td align="right">邮政编码：</td>
		<td>
		    <span name="organizations/zip_code"> 
			    <x:out select="$xmlData/data/organizations/organization[@submit_org='1']/zip_code" /> 
		    </span>
		</td>
	</tr>
	
	<tr>
		<td align="right" >注册资本：</td>
		<td>
		    <span name="org_basic_info/registe_fund"> 
			    <x:out select="$xmlData/data/org_basic_info/registe_fund" />
		    </span>万
		    <span name="organizations/registe_fund_money_name">
		    <x:out select="$xmlData/data/organizations/organization[@submit_org='1']/registe_fund_money_name" />
		    </span>
		</td>
		<td align="right">注册年月：</td>
		<td>	
		<c:set var="registe_date" ><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/registe_date" /></c:set>
				    <c:set var="temp">${fn:substring(registe_date,0,10) }</c:set>
					${fn:split(temp,'-')[0]}年${fn:split(temp,'-')[1]}月
		    <input type="hidden" name="organizations/registe_date" 
			    value="<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/registe_date" />"/>
		</td>
	</tr>
	<tr >
            <td align="right">登记注册类型：</td>
				<td>
		   	<span name="organizations/nature_name">
		      <x:out select="$xmlData/data/organizations/organization[@submit_org='1']/nature_name" />
		      </span>
		   	<input  type="hidden"  name="organizations/nature_value"  value="<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/nature_value" />" />
		</td>  
		<td align="right" >行业类别：</td>
		<td>
		    <span name="organizations/belong_industry_name"> 
			 <x:out select="$xmlData/data/organizations/organization[@submit_org='1']/belong_industry_name" />
			</span>
	         <input  type="hidden"  name="organizations/belong_industry_value"  value="<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/belong_industry_value" />" />
			    	
		</td>    
      </tr> 
	<tr>
		
		<td align="right">工商注册地：</td>
		<td>
		<span name="organizations/area_name"> 
         <x:out select="$xmlData/data/organizations/organization[@submit_org='1']/area_name" />		
         </span>
     <input  type="hidden"  name="organizations/area_value"  value="<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/area_value" />" />
     
         </td>
		
		<td align="right" nowrap>所在园区：</td>
		<td>
			<c:set var="industrial_park"><x:out select="$xmlData/data/organization/industrial_park" /></c:set>
		    <input type="text" style="width: 90%" maxlength="50" label="所在园区" name="organization/industrial_park"  class="input_css required" value="<x:out select="$xmlData/data/organization/industrial_park" />"/>
		</td>
	</tr>
	
	<tr >
		
		<td align="right">产品（服务）所属技术领域 ：</td>
		<td><c:set var="product_area"><x:out select="$xmlData/data/organization/product_area" /></c:set>
     <input type="text" style="width: 90%" label="产品（服务）所属技术领域" maxlength="100" name="organization/product_area"  class="input_css required" value="<x:out select="$xmlData/data/organization/product_area" />"/>
		    
		</td>
		<td align="right" >主要产品（服务） ：</td>
		<td id="fenhao">
		    <span name="products/goods/gname"  id="goods_gname" > 
			   <x:forEach select="$xmlData/data/product/goods" var="goods" varStatus="good">
			      <x:out select="$goods/gname" />
			      <c:if test="${!good.last}">；</c:if>
			    </x:forEach>
		    </span>
		</td>
	</tr>
	
	<tr>
		<%-- <td align="right" >认定类型  ：</td>
		<td>
			<cpt:checkbox key="technology_resource" name="chk_technology_resource" repeatColumn="2" tagType="radio" style="border: 0px; padding: 0px; margin: 0px;" ></cpt:checkbox>
         	<input type="hidden" name="organization/chk_technology_resource_value" id="chkTechnologyResource" value="<x:out select="$xmlData/data/organization/chk_technology_resource_value" />" class="required" label="认定类型"/>
         	<input type="hidden" name="organization/chk_technology_resource_name" value="<x:out select="$xmlData/data/organization/chk_technology_resource_name" />"/> 
		</td> --%>
		<td align="right" >主管单位 ：</td>
          <td align="left"  >
             <c:set var="recomend_org_value"><x:out select="$xmlData/data/proposal/recomend_org_value" /></c:set>
            <c:set var="recomend_org_name"><x:out select="$xmlData/data/proposal/recomend_org_name" /></c:set>
          	<c:set var="recomend">{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />','name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'}</c:set>
          	<cpt:tree key="tjbm_prp" cacheable="false" className="hn_iuput_kuang " onlyChooseLeaf="false" readonly="true" value="${recomend}" label="主管单位"
          		id="recomend_org" name="recomend_org"  showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue2"/>
          	<input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value" class="required"   label="主管单位" value="${recomend_org_value }"/>
            <input  type="hidden" name="proposal/recomend_org_name" value="${recomend_org_name }"/>
            
            <%-- <input type="hidden" name="proposal/recomend_org_type" id="recomend_org_type" value="<x:out select="$xmlData/data/proposal/recomend_org_type"/>"> --%>
          </td>
		<td align="right">认定部门：</td>
		<td>
		     <input id="department1_value" type="hidden" name="proposal/tjbm_org_value"  label="认证部门"  value="<x:out select="$xmlData/data/proposal/tjbm_org_value" />"/>
            <span id="department1_name"  name="proposal/tjbm_org_name"><x:out select="$xmlData/data/proposal/tjbm_org_name" /></span>    
		</td>
		 
	</tr>
	</table>
  <table class="t_css table01" width="100%" border="0" cellpadding="0" id="orgInfo2" cellspacing="1">
	<col style="width:18%"/>
	<col style="width:20%"/>
	<col style="width:12%"/>
	<col style="width:20%"/>
	<col style="width:12%"/>
	<col style="width:18%"/>
  <tr>
		<td align="right">法定代表人：</td>
		<td>
          <span name="organization_persons/cname">
					<x:out select="$xmlData/data/organization_persons/person[@type='faren']/cname" />
		    </span>
		</td>
		<td align="right">性别：</td>
		<td>
         <c:set var="gender"><x:out select="$xmlData/data/persons/gender_value" /></c:set>
			<cpt:select id="gender" name="persons/gender" key="gender"  value="${gender}" onChange="initControlValue(this.id);"  style="width:70px;"></cpt:select>
			<input type="hidden" id="gender_value" name="persons/gender_value"  class="input_css required" value="${gender}" label="性别">
			<input type="hidden" id="gender_name" name="persons/gender_name" value="<x:out select="$xmlData/data/persons/gender_name" />"> 
		</td>
		<td align="right">身份证号码：</td>
		<td>
		    <span name="organization_persons/id_no">
		    	<x:out select="$xmlData/data/organization_persons/person[@type='faren']/id_no"/>
		    </span>
		</td>
	</tr>	 
	<tr>
	<td align="right">学历：</td>
		<td>
		  <span name="organization_persons/educate_background_name"> 
		  <x:out select="$xmlData/data/organization_persons/person[@type='faren']/educate_background_name" />
			</span>
		</td>
	<td align="right">电子邮箱：</td>
		<td> <span name="organization_persons/email">
				<x:out select="$xmlData/data/organization_persons/person[@type='faren']/email" />
		    </span>
		</td>
		
		<td align="right">手机号码：</td>
		<td>
		    <span name="organization_persons/mobile"> 
			    <x:out select="$xmlData/data/organization_persons/person[@type='faren']/mobile" /> 
		    </span>
		</td>
	</tr>
	
	<security:authorize ifNotGranted="A_DAILU_PROPOSAL">  <!-- 申报人进来填写 -->
	<tr>
	<td align="right"> 联系人：</td>
		<td>
			<span name="contact/zh_name" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" /></span>
		</td>
		<td align="right">电子邮箱：</td>
		<td>
		  <span name="contact/email" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" /></span>
		</td>
		<td align="right">手机号码：</td>
		<td>
		    <span name="contact/mobile" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" /></span>
		</td>
	</tr>
</security:authorize>
<security:authorize ifAnyGranted="A_DAILU_PROPOSAL"> <!-- 申报单位填写 -->
<tr>
	<td align="right"> 联系人：</td>
		<td>
		    <input type="hidden" name="zh_persons/zh_person[0]@submit_psn" value="1"/>
			<span id="sbdw_zh_name" name="contact/zh_name" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" /></span>
			<input type="hidden" id="sbdw_zh_name_hidden" name="zh_persons/zh_person[0]/basic_info/zh_name"  value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" />"/>
			<c:set var="psn_code"><x:out select="$xmlData/data/proposal/psn_code" /></c:set>
			<input type="button" class="button_02" style="height: 25px; padding: 1px;" id="selectPsn" value="设置联系人">
			<cpt:personSelect key="personSelect" addRole="3" psnCode="${psn_code }" callback="selectPsnCall" bindEvent="click" bindObject="selectPsn" title="设置项目负责人" fltFile="personSelector.ftl"></cpt:personSelect>
		</td>
		<td align="right">电子邮箱：</td>
		<td>
		  <span id="sbdw_email" name="contact/email" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" /></span>
		  <input type="hidden" id="sbdw_email_hidden" name="zh_persons/zh_person[0]/contact/email"  value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" />"/>
		</td>
		<td align="right">手机号码：</td>
		<td>
		    <span id="sbdw_mobile" name="contact/mobile" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" /></span>
		    <input type="hidden" id="sbdw_mobile_hidden" name="zh_persons/zh_person[0]/contact/mobile"  value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" />"/>
		    
		</td>
	</tr>
</security:authorize>
	<tr>
		<td align="right" rowspan="2" style="background-color:white">企业已有认定资格   ：</td>
		<td  colspan="2">
			<cpt:checkbox key="rending_type1" name="proposal/rending_type1" repeatColumn="1" style="border: 0px; padding: 0px; margin: 0px;" onClick="setRendingType('rending_type1');"></cpt:checkbox>
         	<input type="hidden" name="proposal/rending_type1_value" id="rending_type1_value" value="<x:out select="$xmlData/data/proposal/rending_type1_value" />"  label="企业已有认定资格"/>
         	<input type="hidden" name="proposal/rending_type1_name" value="<x:out select="$xmlData/data/proposal/rending_type1_name" />"/> 
		</td>
		<td align="right" >证书编号 ：</td>
		<td  colspan="2">
		 <input id="rending_type1_no" type="text" maxlength="50"  style="width: 90%" name="proposal/rending_type1_no" class="input_text"  label="证书编号" value="<x:out select="$xmlData/data/proposal/rending_type1_no" />"/>	
		</td>		
	</tr>
	<tr>
		<td  colspan="2" style="background-color:white">
		<cpt:checkbox key="rending_type2" name="proposal/rending_type2" repeatColumn="1" style="border: 0px; padding: 0px; margin: 0px;" onClick="setRendingType('rending_type2');"></cpt:checkbox>
         	<input type="hidden" name="proposal/rending_type2_value" id="rending_type2_value" value="<x:out select="$xmlData/data/proposal/rending_type2_value" />" label="企业已有认定资格"/>
         	<input type="hidden" name="proposal/rending_type2_name" value="<x:out select="$xmlData/data/proposal/rending_type2_name" />"/> 
	  </td>
		<td align="right" style="background-color:white">批准文号：</td>
		<td  colspan="2" style="background-color:white"><input id="rending_type2_no" type="text"  style="width: 90%" maxlength="50" name="proposal/rending_type2_no" class="input_text"  label="批准文号" value="<x:out select="$xmlData/data/proposal/rending_type2_no" />"/>	</td>		
	</tr>
	<tr>
		<td align="right" >填报时间：</td>
		<td  colspan="2">
			<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
			<cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date }" className="date required" label="填报时间"></cpt:date>
		</td>
		<td align="right" >认定类型  ：</td>
		<td colspan="2">
			<cpt:checkbox key="hold_type" name="hold_type" repeatColumn="2" tagType="radio" style="border: 0px; padding: 0px; margin: 0px;" onClick="setBerif();"></cpt:checkbox>
         	<input type="hidden" name="organization/hold_type_value" id="hold_type_value" value="<x:out select="$xmlData/data/organization/hold_type_value" />" class="required" label="认定类型"/>
         	<input type="hidden" name="organization/hold_type_name" value="<x:out select="$xmlData/data/organization/hold_type_name" />"/>
		</td>
		
	</tr>
	
</table>
<br/>
<script type="text/javascript">
$(function(){
	setRendingType('rending_type1');
	setRendingType('rending_type2');
	compareValue();
});
function initTreeValue2(treeId, treeNode) {
  	//针对单位性质
  	if (( treeNode && treeNode.level == 0)) {
		scmWarn("请选择具体的"+$("#" + treeId).attr("label"));
			$("#" + treeId).val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
			return false;
	}/* else if(treeNode.level == 1 && treeNode.isParent){
		scmWarn("请选择下面的子节点");
		$("#" + treeId).val("");
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
		return false;
	} */
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			//str = obj.name + "-" + str;
			obj = obj.parentNode;
		}
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
		$("#" + treeId).val(str);
		if(treeNode.level > 1){
			$("#department1_name").text(treeNode.parentNode.name);
			$("#department1_value").val(treeNode.parentNode.id);
		}else{
			$("#department1_name").text(str);
			$("#department1_value").val(treeNode.id);
		}
		
		compareValue();
	}
function setRendingType(obj){
	var value =$("#"+obj+"_value").val();
	if(value != ''){
		$("#"+obj+"_no").attr("disabled",false);
		$("#"+obj+"_no").attr("class","input_text required");
	}else{
		$("#"+obj+"_no").attr("disabled",true);
		$("#"+obj+"_no").attr("class","input_text gray");
	}
}
function compareValue(){
	var recomend_org_value = $.trim($("#recomend_org_value").val());
	var department1_value = $.trim($("#department1_value").val());
	if(recomend_org_value != department1_value){
		$("#recomend_org_type").val('17');
	}else{
		$("#recomend_org_type").val('15');
	}
	/* alert($("#recomend_org_type").val()); */
}
</script>